// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui' // api: https://element.eleme.cn/#/zh-CN/component/installation
import 'element-ui/lib/theme-chalk/index.css'
import VueCookie from 'vue-cookies'
import mavonEditer from 'mavon-editor' // api: https://github.com/hinesboy/mavonEditor
import 'mavon-editor/dist/css/index.css'
import http from '@/utils/request'
import { isAuth } from '@/utils'
import App from './App'

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(VueCookie)
Vue.use(mavonEditer)

Vue.prototype.$http = http
Vue.prototype.isAuth = isAuth

// 非生产环境, 适配mockjs模拟数据          // api: https://github.com/nuysoft/Mock
if (process.env.NODE_ENV !== 'production') {
  require('@/mock')
}

/* eslint-disable no-new */
new Vue({
  el: '#app',
  store,
  router,
  components: { App },
  template: '<App/>'
})
